#事情少一点下次准备函数存储

def make_pizza(*toppings):
    """概述要制作的比萨。"""
    print("\nMaking a pizza with the following toppings:")
    for topping in toppings:
        print(f"- {topping}")

make_pizza('pepperoni')
make_pizza('mushrooms', 'green peppers', 'extra cheese')
make_pizza(16, 'pepperoni')
make_pizza(12,'mushrooms', 'green peppers', 'extra cheese')
def print_models(unprinted_designs, completed_models):
    """
    模拟打印每个设计，直到没有未打印的设计为止。
    打印每个设计后，都将其移到列表completed_models中。
    """
    while unprinted_designs:
        current_design = unprinted_designs.pop()
        print(f"Printing model: {current_design}")
        completed_models.append(current_design)

def show_completed_models(completed_models):
    """显示打印好的所有模型。"""
    print("\nThe following models have been printed:")
    for completed_model in completed_models:
        print(completed_model)
unprinted_designs = ['phone case', 'robot pendant', 'dodecahedron']
completed_models = []

print_models(unprinted_designs, completed_models)
show_completed_models(completed_models)
#练习册:
def make_sandwich(*ingredients):
    print(f"Making a sandwich with the following ingredients:")
    for ingredient in ingredients:
        print(f"- {ingredient}")

make_sandwich('ham')
make_sandwich('lettuce', 'tomato')
make_sandwich('cheese', 'bacon', 'onion')
def build_profile(first, last, **user_info):
    """创建用户简介字典"""
    profile = {}
    profile['first_name'] = first
    profile['last_name'] = last
    for key, value in user_info.items():
        profile[key] = value
    return profile
my_profile = build_profile('John', 'Doe', hobby='reading', job='engineer', age=30)
print(my_profile)
def make_car(manufacturer, model, **options):
    car_info = {
       'manufacturer': manufacturer,
       'model': model
    }
    for key, value in options.items():
        car_info[key] = value
    return car_info
car = make_car('subaru', 'outback', color='blue', tow_package=True)
print(car)
def function_name(parameter_0, parameter_1, parameter_2,parameter_3, parameter_4, parameter_5):
    function_name('qiaob', 'aifhg','fgh','dfgbl','kop','wrhut')
    print(function_name)
